package sctu.edu.java.year2016.team05.lizixin.day20160614.LianXi4;

/**
 * Created by home on 2016/6/14.
 * 12.1
 */
import java.io.File;
public class FileTest {
    public static void main(String[] args) {
        File file=new File("D:/JAVA","Test.txt");
        if(file.exists()){
            file.delete();
            System.out.println("文件已经删除");
        }else {
            try{file.createNewFile();
                System.out.println("文件已经创建");}catch (Exception e){
                e.printStackTrace();
            }
        }
    }
}
